const getters = {
  sidebar: state => state.app.sidebar,
  device: state => state.app.device,
  token: state => state.user.token,
  avatar: state => state.user.userInfo.staffPhoto,
  name: state => state.user.userInfo.username,
  company: state => state.user.userInfo.company,
  departmentName: state => state.user.userInfo.departmentName,
  points: state => state.user.userInfo?.roles?.points // 用户/的按钮操作权限列表
  // points: state => {
  //   if (state.user.userInfo.roles) return state.user.userInfo.roles.points
  // } // 用户的按钮操作权限列表
  /* name: function(state) {
    return state.user.name
  } */
  /*   name: (state) => {
    return state.user.name
  } */
  // name: state => state.user.name
}
export default getters
